﻿using System.ComponentModel.DataAnnotations;

namespace MvcSimplyCleverPart1.Models
{
    public class AddressViewModel
    {
        [Display(Name = "Street")]
        [Required(ErrorMessage = "The value is required")]
        public string Line1 { get; set; }

        public string Line2 { get; set; }

        [Display(Name = "City")]
        [Required(ErrorMessage = "The value is required")]
        public string City { get; set; }

        [Display(Name = "County")]
        public string County { get; set; }

        [Display(Name = "State")]
        public string StateCode { get; set; }

        [Display(Name = "Zip Code")]
        [Required(ErrorMessage = "The value is required")]
        [RegularExpression(@"^\d{5}(-(\d{4}|\d{6}))?$", ErrorMessage ="Please provide valid zip code.")]
        public string ZipCode { get; set; }
    }
}